"""add_close_order_type_to_trades_table

Revision ID: 01f37be65c4a
Revises: ac2c3dec62c3
Create Date: 2025-07-02 16:26:08.501895

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '01f37be65c4a'
down_revision: Union[str, None] = 'ac2c3dec62c3'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # Add close_order_type column to trades table
    op.add_column('trades', sa.Column('close_order_type', sa.String(), nullable=True))


def downgrade() -> None:
    """Downgrade schema."""
    # Remove close_order_type column from trades table
    op.drop_column('trades', 'close_order_type')
